
Use Tunga;

GO
--Insert Order Food Detail
Alter PROC insertOrderFoodDetail
	@[orderfoodid] int,
	@[foodid] int,
	@[money] float,
	@[quantity] int
AS
INSERT INTO  OrderFoodDetail([orderfoodid],[foodid],[money],[quantity]) 
VALUES (@[orderfoodid],@[foodid],@[money],@[quantity])	
GO
--Get All Order Food Detail By Order Food ID
Alter PROC getAllOrderFoodDetailByOrderFoodID
	@[orderfoodid] int
AS
SELECT	Food.[name], OrderFoodDetail.[quantity], OrderFoodDetail.[foodid],  OrderFoodDetail.[money]
FROM	OrderFoodDetail INNER JOIN Food ON OrderFoodDetail.[foodid] = Food.[id]
WHERE	OrderFoodDetail.[orderfoodid] = @[orderfoodid]
GO



